package com.cy.ppj;

import com.spring4all.swagger.EnableSwagger2Doc;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@SpringBootApplication
@EnableTransactionManagement
@EnableCaching
@ServletComponentScan
@EnableSwagger2Doc
@RestController
public class PpjApplication extends SpringBootServletInitializer {

    @RequestMapping("")
    public String index() {
        log.info("您好！匹配家！");
        return "您好！匹配家！";
    }

    public static void main(String[] args) {
        SpringApplication.run(PpjApplication.class, args);
    }

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(PpjApplication.class);
    }

}
